﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BitTorrent.Bencode {
    internal abstract class Object {
        internal abstract int ByteSize { get; }

        internal abstract int Encode(byte[] data, int offset);

        internal byte[] Encode() {
            var data = new byte[ByteSize];
            Encode(data, 0);

            return data;
        }
    }
}
